package org.blade.personal.dao.base;

import java.io.Serializable;
import java.util.List;

import org.blade.personal.mode.BaseEntity;

/**
 * 
 * @author blade
 *
 * @param <T>
 * @param <ID>
 */
public abstract class DaoImpl<T extends BaseEntity<ID>, ID extends Serializable> implements Dao<T, ID> {

	/**
	 * 
	 * @param entity
	 */
	public abstract void add(T entity);

	/**
	 * 
	 * @param entities
	 */
	@Override
	public abstract void add(List<T> entities);

	/**
	 * 
	 * @param entity
	 */
	public abstract void update(T entity);

	/**
	 * 
	 * @param entities
	 */
	public abstract void update(List<T> entities);

	/**
	 * 
	 * @param entity
	 */
	public abstract void delete(T entity);

	/**
	 * 
	 * @param id
	 */
	public abstract void deleteById(ID id);

	/**
	 * 
	 * @param entities
	 */
	public abstract void delete(List<T> entities);
	
	/**
	 * 
	 * @param entity
	 */
	public abstract List<T> queryForList(T entity);
	
	/**
	 * 
	 * @param id
	 */
	public abstract T getById(ID id);
	
}
